import request from '@/utils/request'

// 查询单位合作关系列表
export function listTeam(query) {
  return request({
    url: '/team/team/list',
    method: 'get',
    params: query
  })
}

// 查询单位合作关系详细
export function getTeam(id) {
  return request({
    url: '/team/team/' + id,
    method: 'get'
  })
}

// 新增单位合作关系
export function addTeam(data) {
  return request({
    url: '/team/team',
    method: 'post',
    data: data
  })
}

// 修改单位合作关系
export function updateTeam(data) {
  return request({
    url: '/team/team',
    method: 'put',
    data: data
  })
}

// 删除单位合作关系
export function delTeam(id) {
  return request({
    url: '/team/team/' + id,
    method: 'delete'
  })
}

// 同意
export function apTeam(id) {
  return request({
    url: '/team/team/' + id,
    method: 'put'
  })
}

// 修改单位合作关系
export function updateTeams(data) {
  return request({
    url: '/team/team/edits',
    method: 'put',
    data: data
  })
}

// 删除单位合作关系
export function delTeams(data) {
  return request({
    url: '/team/team/del',
    method: 'delete',
    data: data
  })
}
